package calcul;

import java.util.Random;
import java.util.concurrent.Callable;

public class MyThread implements Callable<Double> {

	private double stockPrice;
	private double strikePrice;
	private int nSteps;
	private int nSimulations;
	private double Drift;
	private double vSqrdt;
	private int z;
	private Random r;
	
	public MyThread(double stockPrice, double strikePrice, int nSteps, int nSimulations, double Drift, double vSqrdt, int z, Random r)
	{
		this.stockPrice = stockPrice;
		this.strikePrice = strikePrice;
		this.nSteps = nSteps;
		this.nSimulations = nSimulations;
		this.Drift = Drift;
		this.vSqrdt = vSqrdt;
		this.z = z;
		this.r = r;
	}

	@Override
	public Double call() throws Exception {

		//System.out.println("Begin Thread " + Thread.currentThread().getName());
		
		return MonteCarlo.calculPartial(stockPrice, strikePrice, nSteps, nSimulations, Drift, vSqrdt, z, r);
		
	}

	
}
